Externalize babel helpers using @babel/runtime #60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl,dr:
This reduces the ES module size from
10664
to9274
bytes (~13%) by externalizing babel runtime helper functions.Many people are using these helper functions elsewhere. By externalizing them, folks can take advantage of only including a single copy (as opposed to the additional copy that was inlined by
react-final-form-arrays
).Details
react-final-form-arrays.es.js goes from something like this:
to this:
Question for maintainers:
When I ran
nps build
, I noticed this console output:It appears that
output.globals
in the rollup config maybe should be updated, but I'm not sure so I've left it unchanged.